package com.heima.manager.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.heima.manager.feignClient.UserFeignClient;
import com.heima.pojo.User;

@Controller
public class MovieController {

	@Autowired
	private UserFeignClient userFeignClient;
	
	@GetMapping("/movie")
	public String getUserById(Integer id,ModelMap map){
	
		User user = userFeignClient.getUserById(id);
		
		map.put("user", user);
		
		return "/success";
	}
}
